package com.baizhi.entity;

import java.util.List;

//专门用来接收参数的实体类
public class BookDTO {
    //接收泛型为基本类型的集合类型的参数  如批量删除时接收的多个ID
    private List<Integer> ids;
    //接收泛型为对象类型的集合类型的参数  如批量增加时接收的多个对象数据
    private List<Book> books;
    //实体类中有个price属性  页面可以会接收 起始价格和最高价格 的参数进行搜索查询
    //此时实体类中没有这两个属性  就可以在这个专门接收参数的实体类中定义两个属性
    private Double strPrice;
    private Double endPrice;

    public BookDTO(List<Integer> ids, List<Book> books, Double strPrice, Double endPrice) {
        this.ids = ids;
        this.books = books;
        this.strPrice = strPrice;
        this.endPrice = endPrice;
    }

    public BookDTO() {
    }

    public List<Integer> getIds() {
        return ids;
    }

    public void setIds(List<Integer> ids) {
        this.ids = ids;
    }

    public List<Book> getBooks() {
        return books;
    }

    public void setBooks(List<Book> books) {
        this.books = books;
    }

    public Double getStrPrice() {
        return strPrice;
    }

    public void setStrPrice(Double strPrice) {
        this.strPrice = strPrice;
    }

    public Double getEndPrice() {
        return endPrice;
    }

    public void setEndPrice(Double endPrice) {
        this.endPrice = endPrice;
    }
}
